<template>
  <div>
    <recomm-home :reclist="reclist"></recomm-home>
  </div>
</template>

<script>
import RecommHome from './components/Recomm.vue'
import axios from 'axios'
export default {
  name: 'Recomm',
  components: {
    RecommHome
  },
  data () {
    return {
      reclist: []
    }
  },
  mounted () {
    axios.get('/lcoaldata/recommend.json')
      .then((res) => {
        // handle success
        let dataObj = res.data // json中所有的数据
        let dataList = dataObj.data // json中的data数据
        if (dataObj.ret && dataList) { // 如果后台处理成功并且列表数据有值，才做相关的数据操作
          this.reclist = dataList.reclist
        }
      })
  }
}
</script>

<style>
</style>
